package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimeInquirychronicoccupationalhistoryMapper;
import com.dime.physical.domain.DimeInquirychronicoccupationalhistory;
import com.dime.physical.service.IDimeInquirychronicoccupationalhistoryService;

/**
 * 问诊急慢性职业史Service业务层处理
 * 
 * @author Tiny
 * @date 2023-10-07
 */
@Service
public class DimeInquirychronicoccupationalhistoryServiceImpl implements IDimeInquirychronicoccupationalhistoryService 
{
    @Autowired
    private DimeInquirychronicoccupationalhistoryMapper dimeInquirychronicoccupationalhistoryMapper;

    /**
     * 查询问诊急慢性职业史
     * 
     * @param id 问诊急慢性职业史主键
     * @return 问诊急慢性职业史
     */
    @Override
    public DimeInquirychronicoccupationalhistory selectDimeInquirychronicoccupationalhistoryById(String id)
    {
        return dimeInquirychronicoccupationalhistoryMapper.selectDimeInquirychronicoccupationalhistoryById(id);
    }

    /**
     * 查询问诊急慢性职业史列表
     * 
     * @param dimeInquirychronicoccupationalhistory 问诊急慢性职业史
     * @return 问诊急慢性职业史
     */
    @Override
    public List<DimeInquirychronicoccupationalhistory> selectDimeInquirychronicoccupationalhistoryList(DimeInquirychronicoccupationalhistory dimeInquirychronicoccupationalhistory)
    {
        return dimeInquirychronicoccupationalhistoryMapper.selectDimeInquirychronicoccupationalhistoryList(dimeInquirychronicoccupationalhistory);
    }

    /**
     * 新增问诊急慢性职业史
     * 
     * @param dimeInquirychronicoccupationalhistory 问诊急慢性职业史
     * @return 结果
     */
    @Override
    public int insertDimeInquirychronicoccupationalhistory(DimeInquirychronicoccupationalhistory dimeInquirychronicoccupationalhistory)
    {
        dimeInquirychronicoccupationalhistory.setCreateTime(DateUtils.getNowDate());
        return dimeInquirychronicoccupationalhistoryMapper.insertDimeInquirychronicoccupationalhistory(dimeInquirychronicoccupationalhistory);
    }

    /**
     * 修改问诊急慢性职业史
     * 
     * @param dimeInquirychronicoccupationalhistory 问诊急慢性职业史
     * @return 结果
     */
    @Override
    public int updateDimeInquirychronicoccupationalhistory(DimeInquirychronicoccupationalhistory dimeInquirychronicoccupationalhistory)
    {
        dimeInquirychronicoccupationalhistory.setUpdateTime(DateUtils.getNowDate());
        return dimeInquirychronicoccupationalhistoryMapper.updateDimeInquirychronicoccupationalhistory(dimeInquirychronicoccupationalhistory);
    }

    /**
     * 批量删除问诊急慢性职业史
     * 
     * @param ids 需要删除的问诊急慢性职业史主键
     * @return 结果
     */
    @Override
    public int deleteDimeInquirychronicoccupationalhistoryByIds(String[] ids)
    {
        return dimeInquirychronicoccupationalhistoryMapper.deleteDimeInquirychronicoccupationalhistoryByIds(ids);
    }

    /**
     * 删除问诊急慢性职业史信息
     * 
     * @param id 问诊急慢性职业史主键
     * @return 结果
     */
    @Override
    public int deleteDimeInquirychronicoccupationalhistoryById(String id)
    {
        return dimeInquirychronicoccupationalhistoryMapper.deleteDimeInquirychronicoccupationalhistoryById(id);
    }
}
